From: Keir Fraser Date: Tue, 23 Jun 2009 10:22:08 +0000 (+0100) Subject: Fix network-bridge ifup problem when bridge has no IP address. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13714 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d1abeffc818dee0e049525ccc6b3940680eef2e2;p=xen.git Fix network-bridge ifup problem when bridge has no IP address. When we want to setup a bridge without a ip address, function do_ifup will not activate the bridge. We should make the bridge active, then vif-bridge can work on the bridge. Signed-off-by: Zhigang Wang --- diff --git a/tools/hotplug/Linux/network-bridge b/tools/hotplug/Linux/network-bridge index 954c0160b7..95aaba0c15 100644 --- a/tools/hotplug/Linux/network-bridge +++ b/tools/hotplug/Linux/network-bridge @@ -111,9 +111,9 @@ do_ifup() { # use the info from get_ip_info() ip addr flush $1 ip addr add ${addr_pfx} dev $1 - ip link set dev $1 up - [ -n "$gateway" ] && ip route add default via ${gateway} fi + ip link set dev $1 up + [ -n "$gateway" ] && ip route add default via ${gateway} fi }